package unit17.soket;

import java.awt.Transparency;
import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;

public class SoketTest {
	public static void main(String[] args) throws  IOException {
		try (Socket s=new Socket("horstmann.com",80)){
			InputStream inStream=s.getInputStream();
			Scanner in=new Scanner(inStream);
			while(in.hasNextLine()){
				String 	line=in.nextLine();
				System.out.println(line);
			}
		}
	}
}
